---@class WdtxData : Object
local Map = require "packages/wdtx/Map"
local WdtxData = {}
-- local InitCards = {
--   wdtx__crossbow=1,
--   wdtx__slash=2,wdtx_thunder__slash=2,
--   wdtx__fire_attack=3
-- }
-- local InitCards = {
--   wdtx__jink=4,wdtx__slash=2,wdtx_thunder__slash=1,wdtx_fire__slash=1,wdtx__analeptic=1
-- }
local InitCards = {
  chitu = 1,wdtx__qinggang_sword = 1,
  wdtx__archery_attack=1,wdtx__savage_assault=1,wdtx__nullification=1,wdtx__ex_nihilo=1,wdtx__dismantlement=1,wdtx__snatch=1,
  wdtx__peach=1,wdtx__jink=4,wdtx__slash=2,wdtx_thunder__slash=1,wdtx_fire__slash=1,wdtx__analeptic=1,
}
local CanUpCards = {wdtx__fan={type=1,mark="@up_fire",v=2,max=2},wdtx__qinggang_sword={type=1,mark="@@up_fengren",v=1,max=1},wdtx__guding_blade={type=1,mark="@@up_pojun",v=1,max=1},wdtx__axe={type=1,mark="@up_easyhurt",v=1,max=1},wdtx__boshi={type=1,mark="@@staymax",v=1,max=1},wdtx__zhenqiao={type=1,mark="@zhenqiaolv",v=1,max=1},
  wdtx__jiancai={type=1,mark="@jiancailv",v=1,max=1},wdtx__crossbow={type=1,mark="@slash_num",v=2,max=6},wdtx__supply_shortage={type=1,mark="@weak_hurt",v=1,max=2},wdtx__fire_attack={type=1,mark="@up_fire",v=1,max=3},
  wdtx__iron_chain={type=2,mark={"@rechain_num","@@alone_facedown"},v=1,max=2},wdtx__analeptic={type=1,mark="@up_analep",v=1,max=1},wdtx__indulgence={type=1,mark="@indulgence_num",v=1,max=1},
  wdtx_lightning={type=1,mark="@reduce_lightning_num",v=1,max=1},wdtx__archery_attack={type=1,mark="@up_arrowhurt",v=1,max=2},wdtx__savage_assault={type=1,mark="@up_easyhurt",v=1,max=2},
  wdtx__nullification={type=1,mark="@@up_nullifi",v=1,max=1},wdtx__ex_nihilo={type=1,mark="@up_exNihilo",v=1,max=2},wdtx__duel={type=1,mark="@slash_reduce",v=1,max=1},
  wdtx__snatch={type=1,mark="@up_snatch",v=1,max=2},wdtx__dismantlement={type=1,mark="@up_dismant",v=1,max=1},wdtx__peach={type=1,mark="@up_recover",v=1,max=1},
  wdtx__jink={type=1,mark="@slash_back",v=1,max=1},wdtx__slash={type=1,mark="@up_damage",v=1,max=3},wdtx_thunder__slash={type=1,mark="@up_damage",v=1,max=3},
  wdtx_fire__slash={type=1,mark="@up_damage",v=1,max=3}
}--type为类型（1为普通增加卡牌标记值，2为mark参数值为table，按顺序升级表的标记，标记值v固定为1），mark为升级后卡牌标记，v为每次升级增加的标记值，max为该卡牌最多的标记值

local CostCards = {
  wdtx__boshi = true,wdtx__jiancai = true
}

local InitSkills = {
  "gongjian","ex__ganglie","ex__jianxiong","ex__leiji","ex__fankui","yuandi","ex__yingzi",
  "suifu","m_ex__jieyue","huayi","souying","pingxi","ex__biyue","ty_ex__sidi","ty__wenji","ty_ex__qingxi","daoshu"
}

local BatSetmentData = {
  {
    weight = {
      delaytricks = 0.05,
      equips = 0.15,
      commontricks = 0.3,
      bases = 0.3
    },
    equips = {
      wdtx__crossbow=0.3,
      wdtx__axe=0.3,
      wdtx__qinggang_sword = 0.15,
      wdtx__fan = 0.15,
      wdtx__guding_blade = 0.1
    },
    delaytricks = {
      wdtx__supply_shortage=0.3,
      wdtx__indulgence=0.3,
      wdtx_lightning=0.4,
    },
    commontricks = {
      wdtx__savage_assault=0.1,
      wdtx__archery_attack=0.1,
      wdtx__iron_chain=0.15,
      wdtx__ex_nihilo=0.1,
      wdtx__fire_attack=0.2,
      wdtx__duel=0.1,
      wdtx__snatch=0.15,
      wdtx__dismantlement=0.1,
    },
    bases = {
      wdtx__peach=0.02,
      wdtx__analeptic=0.03,
      wdtx_thunder__slash=0.15,
      wdtx_fire__slash=0.15,
      wdtx__jink=0.2,
      wdtx__slash=0.3,
      wdtx__nullification=0.15,
    }
  },
  {
    weight = {
      delaytricks = 0.05,
      equips = 0.18,
      commontricks = 0.32,
      bases = 0.45
    },
    equips = {
      wdtx__crossbow=0.3,
      wdtx__axe=0.3,
      wdtx__qinggang_sword = 0.15,
      wdtx__fan = 0.15,
      wdtx__guding_blade = 0.1
    },
    delaytricks = {
      wdtx__supply_shortage=0.3,
      wdtx__indulgence=0.3,
      wdtx_lightning=0.4,
    },
    commontricks = {
      wdtx__savage_assault=0.1,
      wdtx__archery_attack=0.1,
      wdtx__iron_chain=0.15,
      wdtx__ex_nihilo=0.1,
      wdtx__fire_attack=0.2,
      wdtx__duel=0.1,
      wdtx__snatch=0.15,
      wdtx__dismantlement=0.1,
    },
    bases = {
      wdtx__peach=0.02,
      wdtx__analeptic=0.03,
      wdtx_thunder__slash=0.15,
      wdtx_fire__slash=0.15,
      wdtx__jink=0.2,
      wdtx__slash=0.3,
      wdtx__nullification=0.15,
    }
  },
}
local BoxData = {
  {
    weight = {
      delaytricks = 0.1,
      commontricks = 0.2,
      bases = 0.4,
      skills = 0.3
    },
    delaytricks = {
      wdtx__supply_shortage={rate=0.2,uplv=1},
      wdtx__indulgence={rate=0.4,uplv=1},
      wdtx_lightning={rate=0.4,uplv=1},
    },
    commontricks = {
      wdtx__savage_assault={rate=0.1,uplv=1},
      wdtx__archery_attack={rate=0.1,uplv=1},
      wdtx__iron_chain={rate=0.1,uplv=1},
      wdtx__ex_nihilo={rate=0.1,uplv=1},
      wdtx__fire_attack={rate=0.2,uplv={1,2}},
      wdtx__duel={rate=0.13,uplv=1},
      wdtx__snatch={rate=0.1,uplv=1},
      wdtx__dismantlement={rate=0.17,uplv=1},
    },
    bases = {
      wdtx__peach={rate=0.02,uplv=1},
      wdtx__analeptic={rate=0.03,uplv=1},
      wdtx_thunder__slash={rate=0.15,uplv=1},
      wdtx_fire__slash={rate=0.15,uplv=1},
      wdtx__jink={rate=0.2,uplv=1},
      wdtx__slash={rate=0.2,uplv=1},
      wdtx__nullification={rate=0.25,uplv=1},
    },
    skills = {
      "gongjian","ex__jianxiong","ex__leiji","ex__fankui","yuandi","zhenfengf",
      "suifu","m_ex__jieyue","huayi","souying","pingxi","ex__biyue","ex__yingzi","ty__wenji","huace","daoshu"
    }
  },
  {
    weight = {
      delaytricks = 0.06,
      commontricks = 0.24,
      bases = 0.4,
      skills = 0.3
    },
    delaytricks = {
      wdtx__supply_shortage={rate=0.3,uplv=1},
      wdtx__indulgence={rate=0.3,uplv=1},
      wdtx_lightning={rate=0.4,uplv=1},
    },
    commontricks = {
      wdtx__savage_assault={rate=0.1,uplv={1,2}},
      wdtx__archery_attack={rate=0.1,uplv={1,2}},
      wdtx__iron_chain={rate=0.1,uplv={1,2}},
      wdtx__ex_nihilo={rate=0.1,uplv={1,2}},
      wdtx__fire_attack={rate=0.2,uplv={2,3}},
      wdtx__duel={rate=0.13,uplv={1,2}},
      wdtx__snatch={rate=0.1,uplv={1,2}},
      wdtx__dismantlement={rate=0.17,uplv={1,2}},
    },
    bases = {
      wdtx__peach={rate=0.05,uplv=1},
      wdtx__analeptic={rate=0.08,uplv=1},
      wdtx_thunder__slash={rate=0.19,uplv={1,2}},
      wdtx_fire__slash={rate=0.19,uplv={1,2}},
      wdtx__jink={rate=0.19,uplv=1},
      wdtx__slash={rate=0.2,uplv={1,2}},
      wdtx__nullification={rate=0.1,uplv=1},
    },
    skills = {
      "ol_ex__fenji","ol_ex__xuanfeng","ol_ex__zhiyan","ol__duanbing","ol__fenxun",
      "aocai","os_ex__gongqi","os__fenghan","biaozhao","ty_ex__danshou","ty_ex__anjian",
      "ty_ex__yaoming","ty_ex__yanzhu","xiecui","qinguo","hongyi","mobile__yuejian","jingzhong",
    }
  },
}

local correct = 11

local ShopData = {
  {
    buyskills = {
      {name = "gongjian",cost = 25+correct},{name = "ex__zhiheng",cost = 40+correct},{name = "ex__jianxiong",cost = 30+correct},{name = "ex__leiji",cost = 25+correct},
      {name = "ex__fankui",cost = 27+correct},{name = "yuandi",cost = 26+correct},{name = "zhenfengf",cost = 30+correct},{name = "suifu",cost = 22+correct},{name = "m_ex__jieyue",cost = 29+correct},{name = "huayi",cost = 30+correct},
      {name = "souying",cost = 24+correct},{name = "pingxi",cost = 32+correct},{name = "ex__biyue",cost = 16+correct},{name = "ex__yingzi",cost = 28+correct},{name = "ty__wenji",cost = 27+correct},
      {name = "huace",cost = 30+correct},{name = "daoshu",cost = 26+correct},{name = "yajiao",cost = 22+correct},{name = "os__cuijin",cost = 23+correct},
      {name = "mou__lieren",cost = 28+correct},
    },

    buycards = {
      weight = {
        delaytricks = 0.1,
        commontricks = 0.4,
        bases = 0.5,
      },
      delaytricks = {
        wdtx__supply_shortage={rate=0.2,uprate={0.5,0.3,0.2},price={13,18,22}},
        wdtx__indulgence={rate=0.4,uprate={0.7,0.3},price={16,22}},
        wdtx_lightning={rate=0.4,uprate={0.7,0.3},price={15,20}},
      },
      commontricks = {
        wdtx__savage_assault={rate=0.12,uprate={0.5,0.3,0.2},price={11,16,19}},
        wdtx__archery_attack={rate=0.12,uprate={0.5,0.3,0.2},price={11,15,18}},
        wdtx__iron_chain={rate=0.15,uprate={0.5,0.3,0.2},price={10,14,20}},
        wdtx__ex_nihilo={rate=0.1,uprate={0.5,0.3,0.2},price={13,17,24}},
        wdtx__fire_attack={rate=0.2,uprate={0.5,0.2,0.1,0.1},price={8,13,18,25}},
        wdtx__duel={rate=0.13,uprate={0.5,0.3,0.2},price={9,14,18}},
        wdtx__snatch={rate=0.15,uprate={0.5,0.3,0.2},price={10,15,19}},
        wdtx__dismantlement={rate=0.17,uprate={0.5,0.3,0.2},price={9,13,17}},
      },
      bases = {
        wdtx__peach={rate=0.1,uprate={0.7,0.3},price={12,18}},
        wdtx__analeptic={rate=0.15,uprate={0.7,0.3},price={12,19}},
        wdtx__jink={rate=0.15,uprate={0.6,0.4},price={11,16}},
        wdtx_thunder__slash={rate=0.15,uprate={0.5,0.3,0.2,0.1},price={10,15,20,25}},
        wdtx_fire__slash={rate=0.15,uprate={0.5,0.3,0.2,0.1},price={10,15,20,25}},
        wdtx__slash={rate=0.2,uprate={0.5,0.3,0.2,0.1},price={10,15,20,25}},
        wdtx__nullification={rate=0.15,uprate={0.7,0.3},price={8,18}},
      },
    },
  },
  {
    buyskills = {
      {name = "ol_ex__fenji",cost = 32+correct},{name = "ty_ex__xuanfeng",cost = 38+correct},{name = "ol_ex__zhiyan",cost = 25+correct},{name = "suoliang",cost = 28+correct},
      {name = "ol__duanbing",cost = 25+correct},{name = "fuji",cost = 24+correct},{name = "aocai",cost = 29+correct},{name = "os_ex__gongqi",cost = 30+correct},{name = "heji",cost = 31+correct},
      {name = "beiyu",cost = 32+correct},{name = "ty_ex__danshou",cost = 39+correct},{name = "ty_ex__anjian",cost = 26+correct},{name = "duchi",cost = 25+correct},
      {name = "ty_ex__yaoming",cost = 29+correct},{name = "ty_ex__yanzhu",cost = 33+correct},{name = "xiecui",cost = 35+correct},{name = "qinguo",cost = 30+correct},
      {name = "guidao",cost = 22+correct},{name = "kangkai",cost = 29+correct},{name = "ex__jizhi",cost = 32+correct},
    },

    buycards = {
      weight = {
        delaytricks = 0.1,
        commontricks = 0.4,
        bases = 0.5,
      },
      delaytricks = {
        wdtx__supply_shortage={rate=0.2,uprate={0.5,0.3,0.2},price={13,18,22}},
        wdtx__indulgence={rate=0.4,uprate={0.7,0.3},price={16,22}},
        wdtx_lightning={rate=0.4,uprate={0.7,0.3},price={15,20}},
      },
      commontricks = {
        wdtx__savage_assault={rate=0.12,uprate={0.5,0.3,0.2},price={11,16,19}},
        wdtx__archery_attack={rate=0.12,uprate={0.5,0.3,0.2},price={11,15,18}},
        wdtx__iron_chain={rate=0.15,uprate={0.5,0.3,0.2},price={10,14,20}},
        wdtx__ex_nihilo={rate=0.1,uprate={0.5,0.3,0.2},price={13,17,24}},
        wdtx__fire_attack={rate=0.2,uprate={0.5,0.2,0.1,0.1},price={8,13,18,25}},
        wdtx__duel={rate=0.13,uprate={0.5,0.3,0.2},price={9,14,18}},
        wdtx__snatch={rate=0.15,uprate={0.5,0.3,0.2},price={10,15,19}},
        wdtx__dismantlement={rate=0.17,uprate={0.5,0.3,0.2},price={9,13,17}},
      },
      bases = {
        wdtx__peach={rate=0.1,uprate={0.7,0.3},price={12,18}},
        wdtx__analeptic={rate=0.15,uprate={0.7,0.3},price={12,19}},
        wdtx__jink={rate=0.15,uprate={0.6,0.4},price={11,16}},
        wdtx_thunder__slash={rate=0.15,uprate={0.5,0.3,0.2,0.1},price={10,15,20,25}},
        wdtx_fire__slash={rate=0.15,uprate={0.5,0.3,0.2,0.1},price={10,15,20,25}},
        wdtx__slash={rate=0.2,uprate={0.5,0.3,0.2,0.1},price={10,15,20,25}},
        wdtx__nullification={rate=0.15,uprate={0.8,0.2},price={8,18}},
      },
    },
  },
}

--战斗怪物数据
local BattleData = {
  {
    normonster = {
      "hj_daobing","hj_daoqibing","hj_gongshou","ex__caocao","ty_ex__liufeng","ex__simayi","ol_ex__huangzhong","ex__luxun","ex__huanggai","ex__zhaoyun","fengxi","ex__zhouyu",
      "ex__lvbu","std__gongsunzan","mini_sp__jiangwei","ol_ex__huaxiong","gaogan","huangyueying","ty_ex__fazheng","ex__machao","ty__lijueguosi","m_ex__zhuhuan","ol_ex__pangde",
      "mobile__gaolan","ex__zhenji","ex__zhangliao","starsp__zhaoyun",
    },
    elitemonster = {
      "wm_zhangfei","mou__huaxiong","fengfang","ol__huangzu","zhangyao","ty__liuye","dukui","ty__huangfusong",
    },
    boss = {
      "godzhangjiao"
    },

    battlenum = {{0,0.33},{0.33,0.75},{0.75,1}},
    battlegrow = {{0,0.5},{0.5,0.8},{0.8,1}},

    battleeliter = {
      elitemonster = {num = 1,norskillnum = 1,strength = 1},
      normonster = {num = 1,strength = 1},
    },
    battleboss = {
      boss = {num = 1,bossskillnum = 3,norskillnum = 1,strength = 3},
      normonster = {num = 1,norskillnum = 1,strength = 2},
    },

    norskills = {
      "tuifeng","fengji","cangxin","chouce","ol_ex__jiewei","tieqi","ol_ex__liegong","xunji","jiaofeng","os__qingkou","biaozhao","yajiao","mini__jianxiong","mieji",
      "ex__leiji","chuanyun","ty_ex__qieting","zhengu","m_ex__tiaoxin","bazhen","jiang",
    },
    eliteskills = {
      "liantao","ty__fengshih","douzhen","zhengxu","ty__wuyuan","xiuwen","xingchong","yiyong",
    },
    bossskills = {
      "guidao","ex__leiji","tianze"
    }
  },
  {--第二章战斗数据
    normonster = {
      "ty__zongyu","qinmi","ex__guanyu","os_ex__zhurong","ty_ex__guohuai","yijik","fuqian","yuechen","dengzhong","ol_ex__zhoutai","maojie","ex__huanggai","ex__zhaoyun",
      "mobile__wangyuanji","qianzhao","m_ex__liaohua","xingcai","zhugezhan","ty_ex__zhuran","ty_ex__lingtong","quyi","sunru","ty_ex__zhangsong",
      "ty_ex__sunxiu","ty__chendeng","l__lvbu","mou__xiahoushi","mayunlu","ty__xunchen","js__duanwei","ol_ex__dianwei","m_ex__panzhangmazhong",
    },
    elitemonster = {
      "zerong","godganning","tenggongzhu","hulao2__godlvbu","luotong","ty_ex__gongsunzan","js__sunjian","zhouyi",
    },
    boss = {
      "ex__sunquan"
    },

    battlenum = {{0,0},{0,0.6},{0.6,1}},
    battlegrow = {{0,0},{0,0.5},{0.5,1}},

    battleeliter = {
      elitemonster = {num = 1,eliskillnum = 1,norskillnum = 1,strength = 2},
      normonster = {num = 1,norskillnum = 1,strength = 1},
    },
    battleboss = {
      boss = {num = 1,bossskillnum = 3,norskillnum = 1,eliskillnum = 1,strength = 4},
      elitemonster = {num = 1,eliskillnum = 1,norskillnum = 1,strength = 3},
      normonster = {num = 1,norskillnum = 1,strength = 2},
    },

    norskills = {
      "tuifeng","mingce","liejie","ty_ex__enyuan","wm_fenzhan","ex__ganglie","ex__luoyi","ol_ex__shizhan","shouye","ol_ex__jieming","ty_ex__shibei",
      "ex__kurou","ex__fankui","ex__luoshen","shezang","langxi","shenxian","ex__yingzi","ol_ex__qiangxi","fuji","ty_ex__anguo","fengpo",
      "sheyan","suizheng","yuandi","ty__wenji","ty__liewei","ex__yiji","yinghun",
    },
    eliteskills = {
      "mou__tieji","ty__wuyuan","heji","mobile__lingren","ty_ex__benxi","ol_ex__chengxiang","fanyin","ty_ex__qingxi","m_ex__dangxian","m_ex__pojun"
    },
    bossskills = {
      "cansi","bingqing","ex__yijue"
    }
  },
}

local OtherEventData = {
  {
    normal = {
      {type = "character",area={0,1},who ="huatuo"},{type = "character",area={0,1},who ="ty__xushao"},
      {type = "character",area={0.5,1},who ="hj_daoqibing"},{type = "character",area={0,1},who ="cuiyan"},{type = "character",area={0,1},who ="js__liubei"},
    },
    advanced = {

    },
  },
  {
    normal = {
      {type = "character",area={0.2,1},who ="shanzei_boss"},{type = "character",area={0.3,1},who ="hulao2__godlvbu"},
    },
    advanced = {

    },
  },
}

local MapData = {
  {
    {node = Map.BoxStr,num=2,progress = {0.2,0.3},prohilink = false},--3
    {node = Map.EliteMonsterStr,num=3,progress = {0.31,0.45},prohilink = false},--5
    {node = Map.AddMaxHp,num=3,progress = {0.5,0.7},prohilink = false},--2
    {node = Map.OtherEventsStr,num=5,progress = {0.3,0.9},prohilink = false}, --6
    {node = Map.ShopStr,num=4,progress = {0.15,0.8},prohilink = false}, --5
    {node = Map.RestStr,num=4,progress = {0.2,0.9},prohilink = false}, --6
    {node = Map.GetPeach,num=1,progress = {0.3,0.8},prohilink = false},--1
    {node = Map.GetAnalep,num=1,progress = {0.3,0.8},prohilink = false},--1
    {node = Map.GetSlash,num=1,progress = {0.3,0.8},prohilink = false},--2
    {node = Map.GetNan,num=1,progress = {0.3,0.8},prohilink = false},--2
    {node = Map.GetWan,num=1,progress = {0.3,0.8},prohilink = false},--2
    {node = Map.NorMonsterStr,num=32,progress = {0,1},prohilink = false},--25
  },
  {
    {node = Map.BoxStr,num=3,progress = {0.2,0.3},prohilink = false},--3
    {node = Map.EliteMonsterStr,num=5,progress = {0.31,0.45},prohilink = false},--5
    {node = Map.AddMaxHp,num=2,progress = {0.5,0.7},prohilink = false},--2
    {node = Map.OtherEventsStr,num=5,progress = {0.3,0.9},prohilink = false}, --6
    {node = Map.ShopStr,num=4,progress = {0.15,0.8},prohilink = false}, --5
    {node = Map.RestStr,num=4,progress = {0.2,0.9},prohilink = false}, --6
    {node = Map.GetPeach,num=2,progress = {0.3,0.8},prohilink = false},--1
    {node = Map.GetAnalep,num=2,progress = {0.3,0.8},prohilink = false},--1
    {node = Map.GetSlash,num=2,progress = {0.3,0.8},prohilink = false},--2
    {node = Map.GetNan,num=2,progress = {0.3,0.8},prohilink = false},--2
    {node = Map.GetWan,num=2,progress = {0.3,0.8},prohilink = false},--2
    {node = Map.NorMonsterStr,num=27,progress = {0,1},prohilink = false},--25
  }
}

function WdtxData:getInitMapData()
  return MapData
end

function WdtxData:getInitSkillsData()
  return InitSkills
end

function WdtxData:getCostCardsData()
  return CostCards
end

function WdtxData:getOtherEventData()
  return OtherEventData
end

function WdtxData:getBattleData()
  return BattleData
end

function WdtxData:getShopData()
  return ShopData
end

function WdtxData:getBoxData()
  return BoxData
end

function WdtxData:getBatSetmentData()
  return BatSetmentData
end

function WdtxData:getInitCards()
  return InitCards
end

function WdtxData:getCanUpCards()
  return CanUpCards
end

return WdtxData